package com.example.home_model.details;

import com.example.home_model.details.deleteEntity.DeleteEntity;
import com.example.home_model.details.entity.commentaddentity.DetailsEntity;
import com.example.home_model.details.entity.commententity.CommentEntity;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiServer {
    @POST("serverdemo/comment/addComment")
    Observable<DetailsEntity> requestAddComment (@Query("commentText") String commentText,
                                                 @Query("height") Integer height,
                                                 @Query("image_url") String image_url,
                                                 @Query("itemId") Long itemId,
                                                 @Query("userId") Long userId,
                                                 @Query("video_url") String video_url,
                                                 @Query("width") Integer width);

    @GET("serverdemo/comment/queryFeedComments")
    Observable<CommentEntity> requestCommentList(@Query("id")Long id,@Query("itemId") Long itemId,
                                                 @Query("pageCount") int pageCount,@Query("userId")Long userId);

    @GET("serverdemo/comment/deleteComment")
    Observable<DeleteEntity> requestDeleteComment(@Query("commentId") Long commentId,
                                                  @Query("itemId") Long itemId,
                                                  @Query("userId") Long userId);
}
